package com.jyh.homework6;

/**
 * @Author JYH
 * @Date 2024/8/8 18:43
 * @Description
 */
public class NumberPrinter extends Thread{
    private Printer p;

    public NumberPrinter(Printer p) {
        this.p = p;
    }
    
    Printer printer=new Printer();

        @Override
        public void run() {
            for (int i = 1; i < 53; i++) {
                printer.print(i);
            }
        }

}
